﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="MoneyManageOrder.aspx.cs" Inherits="WEALTH.MoneyManageOrder" %>

<asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        // 清空所有检索条件
        function cleartext() {
            jQuery("#MainContent_username").val("");
            jQuery("#MainContent_radbtnSex0").attr('checked', false);
            jQuery("#MainContent_radbtnSex1").attr('checked', false);
            jQuery("#MainContent_phone").val("");
            jQuery("#MainContent_mobilphone").val("");
            jQuery("#MainContent_email").val("");
            jQuery("#MainContent_address").val("");
            jQuery("#MainContent_zipcode").val("");
            jQuery("#MainContent_txtcontent").val("");
            jQuery("#MainContent_checkbox1").attr('checked', false);
            jQuery("#MainContent_checkbox2").attr('checked', false);
            jQuery("#MainContent_checkbox3").attr('checked', false);
            jQuery("#MainContent_checkbox4").attr('checked', false);
            jQuery("#MainContent_radio1").attr('checked', false);
            jQuery("#MainContent_radio2").attr('checked', false);
            jQuery("#MainContent_radio3").attr('checked', false);
            jQuery("#MainContent_radio4").attr('checked', false);
            jQuery("#MainContent_radio21").attr('checked', false);
            jQuery("#MainContent_radio22").attr('checked', false);
            jQuery("#MainContent_radio23").attr('checked', false);
            jQuery("#MainContent_radio24").attr('checked', false);
            return true;
        }

        function validate() {
            //alert('init');
            var message = '';
            var username = $('#MainContent_username').val();
            if (username.length == 0) {
                message += "用户名不能为空！<br/>";
            }
            if (CheckScript(username)) {
                message += "用户名中含有不安全的标签！<br/>";
            }
            var sex = $('input:radio[name="ctl00$MainContent$Sex"]:checked').val();
            if (sex == null)
                message += "请选择性别！<br/>";
            var phone = $('#MainContent_phone').val();
            if (phone.length == 0) {
                message += "联系电话不能为空！<br/>";
            }
            else if (phone.length > 15 && phone.length > 0)
                message += "联系电话格式不正确！<br/>";

            if (CheckScript(phone)) {
                message += "联系电话含有不安全的标签！<br/>";
            }
            var mobilphone = $('#MainContent_mobilphone').val();
            if (mobilphone.length == 0) {
                message += "手机号码不能为空！<br/>";
            }
            else if (mobilphone.length > 0 && mobilphone.length != 11)
                message += "手机号码格式不正确！<br/>";

            if (CheckScript(mobilphone)) {
                message += "手机号码含有不安全的标签！<br/>";
            }
            //else if(mobilphone==0)
            // mobilphone='00000000000';
            var email = $('#MainContent_email').val();
            if (email.length == 0) {
                message += "email 不能为空~！<br/>";
            } else if (!checkEmail(email) && email.length > 50)
                message += "email格式不正确！<br/>";

            var address = $('#MainContent_address').val();
            if (address.length == 0) {
                message += "通讯地址不能为空！<br/>";
            }
            else if (address.length > 100)
                message += "你输入的通信地址太长！<br/>";

            if (CheckScript(address)) {
                message += "通信地址含有不安全的标签！<br/>";
            }
            var zipcode = $('#MainContent_zipcode').val();
            if (zipcode.length > 11)
                message += "你输入的邮编格式不正确！<br/>";

            if (CheckScript(zipcode)) {
                message += "邮编格式含有不安全的标签！<br/>";
            }

            var question1 = $('input:radio[name="ctl00$MainContent$Age"]:checked').val();
            if (question1 == null)
                message += "请选择你的年龄！<br/>";
            var question2 = $('input:radio[name="ctl00$MainContent$Question2"]:checked').val();
            if (question2 == null)
                message += "请选择你过去的投资情况！<br/>";

            //var question3 = '';
            //var checkedObj = $('input:checkbox[name="checkbox"]:checked'); //获取当前checked的value值 如果选中多个则循环
            //checkedObj.each(function() { var isCheck = this.value; question3 += isCheck; });
            //alert("当前选中的"+question3);
            //if(question3.length==0)
            //message += "请选择你想了解到理财产品！<br/>";

            if ($("#MainContent_checkbox1").attr("checked") == false && $("#MainContent_checkbox2").attr("checked") == false && $("#MainContent_checkbox3").attr("checked") == false && $("#MainContent_checkbox4").attr("checked") == false) {
                message += "请选择你想了解到理财产品！<br/>";
            }

            var content = $('#MainContent_txtcontent').val();
            if (content.length == 0)
                message += "请填写你的需求！<br/>";

            if (CheckScript(content)) {
                message += "需求中含有不安全的标签！<br/>";
            }

            if (message.length != 0) {
                jBox.alert(message, '页面信息输入有误，请确认！');
                return false;
            } else {
                return true;
            }
        }
        function checkEmail(myString) {
            var reg = RegExp(/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/);
            if (reg.test(myString)) return true;
            return false;

        }

        //过滤javaScript
        function CheckScript(str) {
            var reg = RegExp(/\<.+?\>/);
            if (reg.test(str)) return true;
            return false;
        }
    </script>
    <div style="background-image: url('images/subIndexTop2.jpg'); background-repeat: no-repeat;
        height: 63px; width: 978px">
    </div>
    <div id="wrapper-250" style="width: 188px; float: left; height: 269px;">
        <img src="images/online.gif" width="180" height="269" usemap="#Map" border="0" />
        <map name="Map" id="Map">
            <area shape="rect" coords="10,11,164,60" href="Risk.aspx" />
            <area shape="rect" coords="10,63,163,111" href="Risk.aspx" />
            <area shape="rect" coords="10,117,164,164" href="Assets.aspx" />
            <area shape="rect" coords="10,167,165,213" href="ListView.aspx?listviewid=15&menutype=投资者教育" />
            <area shape="rect" coords="9,220,163,267" href="MoneyManageOrder.aspx" />
        </map>
    </div>
    <div id="wrapper-750" style="width: 80%; float: right;">
        <!--right begin-->
        <div class="product_right">
            <div class="personal-info">
                <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="left" class="assets_lineheight">
                            <strong>请完整填写以下表格，来自枫帆财富的专业理财顾问将尽快与您联络！</strong>
                        </td>
                    </tr>
                </table>
                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1"
                    class="assetsform">
                    <tr>
                        <th colspan="6" align="left" bgcolor="#E3E5E9">
                            <strong>您的简况</strong>
                        </th>
                    </tr>
                    <tr>
                        <td width="130px" align="left">
                            您的姓名：
                        </td>
                        <td width="10%" align="left">
                            <asp:TextBox name="username" runat="server" ID="username" MaxLength="12"></asp:TextBox>
                        </td>
                        <td align="left" style="width:50px">
                            性别：
                        </td>
                        <td align="left" nowrap="nowrap" style="width: 9%">
                            <asp:RadioButton ID="radbtnSex0" Text="先生" runat="server" GroupName="Sex" />
                            <asp:RadioButton ID="radbtnSex1" Text="女士" runat="server" GroupName="Sex" />
                            <%--<label>
                        <input value="0" name="sex" type="radio" id="rdman" size="2" />先生 &nbsp;
                        <input value="1" name="sex" type="radio" id="rdnv" size="2" />女士
                    </label>--%>
                        </td>
                        <td width="100px" align="left">
                            联系电话：
                        </td>
                        <td width="20%" align="left">
                            <asp:TextBox name="phone" runat="server" ID="phone" MaxLength="20"></asp:TextBox>
                            <%-- <label>
                        <input name="phone" type="text" id="phone" size="20" /></label>--%>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            手机号码：
                        </td>
                        <td colspan="3" align="left">
                            <asp:TextBox name="mobilphone" runat="server" ID="mobilphone" MaxLength="30" onkeypress="return event.keyCode>=48&amp;&amp;event.keyCode&lt;=57||event.keyCode==46"
                                onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false"></asp:TextBox>
                        </td>
                        <td align="left">
                            E-mail：
                        </td>
                        <td align="left">
                            <asp:TextBox name="email" runat="server" ID="email" MaxLength="20"></asp:TextBox>
                            <%--<label>
                        <input name="email" type="text" id="email" size="20" /></label>--%>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            您的通信地址：
                        </td>
                        <td colspan="3" align="left">
                            <asp:TextBox name="address" runat="server" ID="address" MaxLength="100" Width="300px"></asp:TextBox>
                            <%--<input name="address" type="text" id="address" size="30" />--%>
                        </td>
                        <td align="left">
                            邮编：
                        </td>
                        <td align="left">
                            <asp:TextBox name="zipcode" runat="server" ID="zipcode" MaxLength="20"></asp:TextBox>
                            <%--<label>
                        <input name="zipcode" type="text" id="zipcode" size="20" /></label>--%>
                        </td>
                    </tr>
                    <tr>
                        <th colspan="6" align="left" bgcolor="#E7E6E6">
                            您的年龄：【选择项：单选】
                        </th>
                    </tr>
                    <tr>
                        <td colspan="6" align="left">
                            <table width="90%" border="0" cellpadding="0" cellspacing="0" class="order">
                                <tr>
                                    <td>
                                        <label>
                                            <asp:RadioButton ID="radio1" Text="30岁以下" runat="server" GroupName="Age" />
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label>
                                            <asp:RadioButton ID="radio2" Text="30~40岁" runat="server" GroupName="Age" />
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label>
                                            <asp:RadioButton ID="radio3" Text="40~50岁" runat="server" GroupName="Age" />
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label>
                                            <asp:RadioButton ID="radio4" Text="50岁以上" runat="server" GroupName="Age" />
                                        </label>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <th colspan="6" align="left" bgcolor="#E3E5E9">
                            您在过去的投资情况：【选择项：单选】
                        </th>
                    </tr>
                    <tr>
                        <td colspan="6" align="left">
                            <table width="90%" border="0" cellpadding="0" cellspacing="0" class="order">
                                <tr>
                                    <td>
                                        <label>
                                            <asp:RadioButton ID="radio21" Text="私募股权（PE）" runat="server" GroupName="Question2" />
                                            <%--<input value="0" name="radio2" type="radio" id="radio21" onclick="SelectQuestion2(0)" />
                                    私募股权（PE）--%>
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label>
                                            <asp:RadioButton ID="radio22" Text="基金" runat="server" GroupName="Question2" />
                                            <%--<input value="1" name="radio2" type="radio" id="radio22" onclick="SelectQuestion2(1)" />
                                    基金--%>
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label>
                                            <asp:RadioButton ID="radio23" Text="信托" runat="server" GroupName="Question2" />
                                            <%--<input value="2" name="radio2" type="radio" id="radio23" onclick="SelectQuestion2(2)" />
                                    信托--%>
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label>
                                            <asp:RadioButton ID="radio24" Text="其他" runat="server" GroupName="Question2" />
                                            <%-- <input value="3" name="radio2" type="radio" id="radio24" onclick="SelectQuestion2(3)" />
                                    其他--%>
                                        </label>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <th colspan="6" align="left" bgcolor="#DFE4EB">
                            目前您最想了解哪些理财产品？【选择项：复选】
                        </th>
                    </tr>
                    <tr>
                        <td colspan="6" align="left">
                            <table width="90%" border="0" cellpadding="0" cellspacing="0" class="order">
                                <tr>
                                    <td>
                                        <label>
                                            <asp:CheckBox ID="checkbox1" runat="server" Text="私募股权（PE）" />
                                            <%--<input name="checkbox1" type="checkbox" id="checkbox1" value="1" />
                                    私募股权（PE）--%></label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label>
                                            <asp:CheckBox ID="checkbox2" runat="server" Text="基金" />
                                            <%--<input name="checkbox2" type="checkbox" id="checkbox2" value="2" />
                                    基金--%></label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label>
                                            <asp:CheckBox ID="checkbox3" runat="server" Text="信托" />
                                            <%--<input name="checkbox3" type="checkbox" id="checkbox3" value="3" />
                                    信托--%></label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label>
                                            <asp:CheckBox ID="checkbox4" runat="server" Text="其他" />
                                            <%--<input name="checkbox4" type="checkbox" id="checkbox4" value="4" />
                                    其他--%></label>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <th colspan="6" align="left" bgcolor="#EEEEEE">
                            您的需求：
                        </th>
                    </tr>
                    <tr>
                        <td colspan="6" align="left" class="need">
                            <textarea name="txtcontent" runat="server" id="txtcontent" cols="140" rows="10"></textarea>
                        </td>
                    </tr>
                </table>
                <table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="126" height="49">
                            <asp:Button ID="btnSubmit" runat="server" Text="理财师预约" OnClientClick="return validate(); "
                                OnClick="btnSubmit_Click" Style="height: 29px; width: 101px;" />
                        </td>
                        <td width="174" align="left">
                            <input type="button" id="btnClear" onclick="cleartext();" value="重新填写" style="height: 29px;
                                width: 101px;" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</asp:Content>
